<?php
	session_start();
		if(!$_SESSION['login'] == 1 && $_SESSION['sessionid'] !== session_id()) {
		header("Location: ./");
		exit;
	}
	
	if($_SESSION['priv'] > 3) {
		$lang = $_SESSION['lang'];
		require_once("include/lang." . $lang . ".php");
		echo ERR_PRIV;
		exit;
	}
	
	//if(isset($_GET['mode']) && $_GET['mode'] == "del" && !empty($_GET['id'])) {
	//	header("Location: users.php");
	//	include("include/functions.php");
	//	$self = $_GET['self'];

		//$users->rm_user($id);
//		exit;
//	}
	
	include("include/class.mysql.php");
	include("include/layout.php");
			
	html_start();
?>

		<br />
		<span class="conin">
			<?php				
				// Edit section
				
					if(empty($_GET['self'])) {
						die("No ID");
					}
					if(!is_numeric($_GET['self'])) {
						die("Invalid ID");
					}
					
					$MySQL->conn();
					$self = $_GET['self'];
					$sql = mysql_query("SELECT * FROM " . DB_PREFIX . "users WHERE id = '$self'") or die(mysql_error());
					while($row = mysql_fetch_array($sql)) {
			?>
			
				<legend><?=CONT_EDIT;?></legend>
				<?=LANG_USER;?>:
					<br />
					Bem vindo <?=$row['uname'];?>
					<br />
					<br />
					Pin
					<br />
					<?=$row['pin'];?>
					<br />
					Telefone
					<br />
					<?=$row['tel'];?>
					<br />					
						
<?}?>







		</span>
<?php	html_end();?>